package org.spruice;

import org.springframework.beans.factory.support.BeanDefinitionBuilder;

import java.util.List;

/**
 * User: mrettig
 * Date: 11/5/12
 * Time: 1:53 PM
 */
public interface Binder {
    <T> BeanConfig<T> autowire(Class<T> clzz);

    <T> BeanConfig<T> autowire(String name, Class<T> clzz);

    <T> BeanConfig<T> construct(Class<T> clzz, Object... args);

    <T> BeanConfig<T> construct(String name, Class<T> clzz, Object... args);

    <T> InstanceConfig<T> register(T singleton);

    <T> InstanceConfig<T> register(String name, T singleton);

    <T, R> FactoryConfig<T, R> asFactory(BeanConfig<T> factoryBean, Class<R> targetClzz);

    <T> BeanDefinitionBuilder createBeanBuilder(Class<T> clzz);

    <T> BeanConfig<T> factory(String name, String factoryBean, String method, Class<T> clzz, Object... args);

    List<ContextEntry> getConfigs();
}
